#include <iostream>
#include <algorithm>
#include <cmath>

using namespace std;

void fun(int arr[1086][1086], int x0, int x1, int y0, int y1)
{
    int i, j, cx, cy;

    if (x0 == x1 - 1)
    {
        return;
    }
    if (y0 == y1 - 1)
    {
        return;
    }

    cx = x0 + (x1 - x0) / 2;
    cy = y0 + (y1 - y0) / 2;
    for (i = x0; i < cx; i++)
    {
        for (j = y0; j < cy; j++)
        {
            arr[i][j] = 1;
        }
    }
    fun(arr, cx, x1, y0, cy);
    fun(arr, x0, cx, cy, y1);
    fun(arr, cx, x1, cy, y1);
}
int arr[1086][1086] = { 0 };
int main(int argc, char const *argv[])
{
    int i, j, n;
    
    cin >> n;

    fun(arr, 0, pow(2, n), 0, pow(2, n));
    
    for (i = 0; i < pow(2, n); i++)
    {
        if (i)
        {
            cout << "\n";
        }
        for (j = 0; j < pow(2, n); j++)
        {
            if (j)
            {
                cout << " ";
            }
            cout << !arr[i][j];
        }
    }
    

    return 0;
}
